package com.example.newsapp.ui.screens.mainScreens

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shadow
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextIndent
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.newsapp.R

// TODO 我的界面
@Composable
fun AccountScreen(modifier: Modifier = Modifier) {
    Column(modifier = Modifier.fillMaxSize()) {
        Column(
            modifier = Modifier.fillMaxWidth().padding(top = 40.dp),
            verticalArrangement = Arrangement.Top,
            horizontalAlignment = Alignment.CenterHorizontally
        ) {
            // 应用图标
            Image(
                painter = painterResource(id = R.drawable.lingxixinwen_logo),
                contentDescription = "灵犀图标",
                modifier = Modifier.size(80.dp)
                    .clip(CircleShape)
            )
            // 应用名称
            Text(
                text = "灵犀新闻",
                fontSize = 20.sp,
                textAlign = TextAlign.Center,
                modifier = Modifier.padding(top = 16.dp)
            )
            // 版本号
            Text(
                text = "版本 V1.0.00",
                fontSize = 18.sp,
                color = Color.Gray,
                textAlign = TextAlign.Center,
                modifier = Modifier.padding(top = 8.dp)
            )
        }
        Text(
            text= "版本介绍",
            fontWeight = FontWeight.Bold,
            fontSize = 22.sp,
            textAlign = TextAlign.Center,
            modifier = Modifier.fillMaxWidth().padding(top = 20.dp)
        )
        Text(
            text = "在当下信息爆炸的时代，这款 APP 的最新版本旨在为用户提供高效、精准且个性化的新闻获取方式。它突破了传统新闻客户端的局限，运用先进的算法，根据用户的浏览历史、收藏偏好、阅读时长等多维度数据，深度分析用户兴趣，从而实现新闻的智能推送。无论是关注科技前沿动态、热衷体育赛事，还是对财经资讯、娱乐八卦感兴趣，“灵犀新闻” APP 都能像知心好友一样，将用户最想看的新闻第一时间呈现在眼前，让每一次打开 APP，都是一场专属于个人的新闻盛宴。",
            modifier.padding(start = 20.dp, end = 20.dp, top = 10.dp),
            style = TextStyle(textIndent = TextIndent(36.sp)),
            fontSize = 18.sp
        )
    }
}